//
//  ShareInfo.m
//  JewelryStore
//
//  Created by lcs on 16/10/15.
//  Copyright © 2016年 com. All rights reserved.
//

#import "ShareInfo.h"

@implementation ShareInfo

- (UMSocialMessageObject *)messageObject
{
    if (!_messageObject) {
        _messageObject = [UMSocialMessageObject messageObject];
    }
    return _messageObject;
}
- (UMShareImageObject *)imageObject
{
    if (!_imageObject) {
        _imageObject = [[UMShareImageObject alloc] init];
    }
    return _imageObject;
}
- (UMShareWebpageObject *)webpageObject
{
    if (!_webpageObject) {
        _webpageObject = [[UMShareWebpageObject alloc] init];
    }
    return _webpageObject;
}
- (UMShareMusicObject *)musicObject
{
    if (!_musicObject) {
        _musicObject = [[UMShareMusicObject alloc] init];
    }
    return _musicObject;
}
- (UMShareVideoObject *)videoObject
{
    if (!_videoObject) {
        _videoObject = [[UMShareVideoObject alloc] init];
    }
    return _videoObject;
}
- (instancetype)initWithTitle:(NSString *)title content:(NSString *)content thumbImage:(UIImage *)thumbImage webPageUrl:(NSString *)webPageUrl
{
    self = [super init];
    if (self) {
        self.type = UmengShareType_WebPage;
        self.webPageUrl = webPageUrl;
        [self initWithTitle:title content:content thumbImage:thumbImage];
    }
    return self;
}

- (instancetype)initWithTitle:(NSString *)title content:(NSString *)content thumbImage:(UIImage *)thumbImage musicUrl:(NSString *)musicUrl
{
    self = [super init];
    if (self) {
        self.type = UmengShareType_Music;
        self.musicUrl = musicUrl;
        [self initWithTitle:title content:content thumbImage:thumbImage];

    }
    return self;
}

- (instancetype)initWithTitle:(NSString *)title content:(NSString *)content thumbImage:(UIImage *)thumbImage videoUrl:(NSString *)videoUrl
{
    self = [super init];
    if (self) {
        self.type = UmengShareType_Vedio;
        self.videoUrl = videoUrl;
        [self initWithTitle:title content:content thumbImage:thumbImage];

    }
    return self;

}
- (void)initWithTitle:(NSString *)title content:(NSString *)content thumbImage:(UIImage *)thumbImage
{
    self.title = title;
    self.content = content;
    self.thumbImage = thumbImage;
}
@end
